import Taro, { Component } from '@tarojs/taro'
import { View, Image} from '@tarojs/components'
import styles from './index.module.less'

export default class Footer extends Component {

    commonClicked(item) {
        console.log(item);
    }

    render() {  
        const {footerNaviItems = [
                {id:'111',title:'店铺主页',url:''},
                {id:'111',title:'个人中心',url:''},
                {id:'111',title:'关注我们',url:''},
                {id:'111',title:'店铺信息',url:''}
            ],
            logo = "https://img.yzcdn.cn/upload_files/2019/12/30/Fn2uU0YfyymQpLJ9N_wjMD4T9zfy.png"
            } = this.props
        return (
            <View className={styles.footer}>
                <View className={styles.footerNavi}>
                    {footerNaviItems.map(item=>(
                        <View className={styles.footerNaviItem} key={item.id} onClick={this.commonClicked.bind(this, item)}>
                            {item.title}
                        </View>
                    ))}
                </View>
                <View className={styles.footerLogo} >
                    <Image className={styles.footerLogoImage} src={logo} mode='widthFix'></Image>
                </View>
              
            </View>
        )
    }
}
